<?php

namespace App\Http\Validations\Web;

use Illuminate\Contracts\Validation\Validator;

class LoginValidation {
    public function create() {
        $rules = [
            'username'=>['required'],
            'password'=>['required'],
        ];
        $attributes = [
            'basic'=>'用户名',
            'category_id'=>'密码',

        ];
        return ['rules' =>$rules,
            'attributes' => $attributes,
            'messages' => []
        ];
    }

    //验证后添加的钩子函数
    public function customValidate(Validator $validator) {
        //
    }
}
